Content Sources
-
Information about an attribution statement, usually a copyright or trademark statement, associated with a map content source.
See moreDeclaration
Objective-C
@interface MGLAttributionInfo : NSObject
Swift
class MGLAttributionInfo : NSObject
-
MGLRasterSource
is a map content source that supplies raster image tiles to be shown on the map. The location of and metadata about the tiles are defined either by an option dictionary or by an external file that conforms to the TileJSON specification. A raster source is added to anMGLStyle
object along with one or moreMGLRasterStyleLayer
objects. Use a raster style layer to control the appearance of content supplied by the raster source.Each
See moreraster
source defined by the style JSON file is represented at runtime by anMGLRasterSource
object that you can use to initialize new style layers. You can also add and remove sources dynamically using methods such as-[MGLStyle addSource:]
and-[MGLStyle sourceWithIdentifier:]
.Declaration
Objective-C
@interface MGLRasterSource : MGLTileSource
Swift
class MGLRasterSource : MGLTileSource
-
MGLShapeSource
is a map content source that supplies vector shapes to be shown on the map. The shapes may be instances ofMGLShape
orMGLFeature
, or they may be defined by local or external GeoJSON code. A shape source is added to anMGLStyle
object along with anMGLVectorStyleLayer
object. The vector style layer defines the appearance of any content supplied by the shape source.Each
geojson
source defined by the style JSON file is represented at runtime by anMGLShapeSource
object that you can use to refine the map’s content and initialize new style layers. You can also add and remove sources dynamically using methods such as-[MGLStyle addSource:]
and-[MGLStyle sourceWithIdentifier:]
.Any vector style layer initialized with a shape source should have a
See morenil
value in itssourceLayerIdentifier
property.Declaration
Objective-C
@interface MGLShapeSource : MGLSource
Swift
class MGLShapeSource : MGLSource
-
MGLSource
is an abstract base class for map content sources. A map content source supplies content to be shown on the map. A source is added to anMGLStyle
object along with anMGLForegroundStyleLayer
object. The foreground style layer defines the appearance of any content supplied by the source.Each source defined by the style JSON file is represented at runtime by an
MGLSource
object that you can use to refine the map’s content. You can also add and remove sources dynamically using methods such as-[MGLStyle addSource:]
and-[MGLStyle sourceWithIdentifier:]
.Do not create instances of this class directly, and do not create your own subclasses of this class. Instead, create instances of
See moreMGLShapeSource
and the concrete subclasses ofMGLTileSource
.Declaration
Objective-C
@interface MGLSource : NSObject
Swift
class MGLSource : NSObject
-
Tile coordinate systems that determine how tile coordinates in tile URLs are interpreted.
See moreDeclaration
Objective-C
enum MGLTileCoordinateSystem : NSUInteger {}
Swift
enum MGLTileCoordinateSystem : UInt
-
MGLTileSource
is a map content source that supplies map tiles to be shown on the map. The location of and metadata about the tiles are defined either by an option dictionary or by an external file that conforms to the TileJSON specification. A tile source is added to anMGLStyle
object along with one or moreMGLRasterStyleLayer
orMGLVectorStyleLayer
objects. Use a style layer to control the appearance of content supplied by the tile source.Do not create instances of this class directly, and do not create your own subclasses of this class. Instead, create instances of
See moreMGLRasterSource
andMGLVectorSource
.
-
MGLVectorSource
is a map content source that supplies tiled vector data in Mapbox Vector Tile format to be shown on the map. The location of and metadata about the tiles are defined either by an option dictionary or by an external file that conforms to the TileJSON specification. A vector source is added to anMGLStyle
object along with one or moreMGLVectorStyleLayer
objects. A vector style layer defines the appearance of any content supplied by the vector source.Each
vector
source defined by the style JSON file is represented at runtime by anMGLVectorSource
object that you can use to initialize new style layers. You can also add and remove sources dynamically using methods such as-[MGLStyle addSource:]
and-[MGLStyle sourceWithIdentifier:]
.Within each vector tile, each geometric coordinate must lie between −1 × extent and (extent × 2) − 1, inclusive. Any vector style layer initialized with a vector source must have a non-
nil
value in itssourceLayerIdentifier
property.Declaration
Objective-C
@interface MGLVectorSource : MGLTileSource
Swift
class MGLVectorSource : MGLTileSource